//
//  MeHealthOrderView.m
//  Ginix
//
//  Created by fzq on 2025/2/17.
//

#import "MeHealthOrderView.h"
#import "MeHealthOrderCell.h"

@interface MeHealthOrderView()<UITableViewDelegate,UITableViewDataSource>
@property (nonatomic,strong) UITableView * listView;

@end

@implementation MeHealthOrderView

-(instancetype)initWithFrame:(CGRect)frame{
    
    if(self = [super initWithFrame:frame]){
        [self setSubViewLayout];
    }
    return self;
}

-(void)setSubViewLayout{
    
    [self addSubview:self.listView];
    
}

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    
    return 10;
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
        
    return  260 * FMScaleX;
}

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    MeHealthOrderCell * cell = [tableView dequeueReusableCellWithIdentifier:@"MeHealthOrderCell"];
    return cell;
}

-(UITableView *)listView{
    
    if (!_listView) {
        _listView = [[UITableView alloc]initWithFrame:CGRectMake(0, 0, WIDTH, self.getHeight)];
        _listView.delegate = self;
        _listView.dataSource = self;
        _listView.showsVerticalScrollIndicator = NO;
        _listView.showsHorizontalScrollIndicator = NO;
        _listView.backgroundColor = UIColor.clearColor;
        _listView.separatorStyle = UITableViewCellSeparatorStyleNone;
        [_listView registerClass:[MeHealthOrderCell class] forCellReuseIdentifier:@"MeHealthOrderCell"];
    }
    return _listView;
}
@end
